f4380f
@@ -110,7 +110,8 @@
public void commitDropTable(Table table, boolean deleteData)
    * @param table new table definition
    */
   public default void preAlterTable(Table table, EnvironmentContext context) throws MetaException {
-    String alterOpType = context == null ? null : context.getProperties().get(ALTER_TABLE_OPERATION_TYPE);
+    String alterOpType = (context == null || context.getProperties() == null) ?
+        null : context.getProperties().get(ALTER_TABLE_OPERATION_TYPE);
     // By default allow only ADDPROPS and DROPPROPS.
     // alterOpType is null in case of stats update.
     if (alterOpType != null && !allowedAlterTypes.contains(alterOpType)){
